<?php

namespace App\Console\Commands;

use App\Http\Models\Mysql\OauthAccessTokensTable;
use Illuminate\Console\Command;

class clearToken extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'command:clearToken';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '定时清理token, 防止用户在日常工作时间 突然掉线';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        return (new OauthAccessTokensTable())->deleteDataWhere(['client_id' => 4]);
    }
}
